package ooday04;

public class Dog extends Animal implements Swim {
    Dog(){}
    Dog(String name,int age,String color){
        super(name, age, color);
    }

    @Override
    void eat() {System.out.println(color+"色的"+age+"岁的狗狗"+name+"正在吃骨头");}
    //重写接口里的方法必须加public，类里面的可以不加public

    void lookHome(){System.out.println(color+"色的"+age+"岁的狗狗"+name+"正在看家");}

    public void swim()
    {
        System.out.println(color+"色的"+age+"岁的狗狗"+name+"正在游泳");
    }
    //重写
}
